1. Field of Invention
This invention relates to data processing having pull and push tasks.
2. Description of Related Art
In a system that emulates a multi-processing pipeline using a single-processing environment, each section of the pipeline is an instantiated function, or task, that performs one or more desired functions such as image processing functions, and sufficient data structure to self-define the state of the task. Such a system is disclosed in U. S. Pat. No. 5, 557,795 which is hereby incorporated by reference.
In operation, when a host application requires data from a raw data source to be processed, such as image data from a scanner or an image data file, a data processing pipeline is formed between the data source and the host application. The data processing pipeline inputs the raw data from the data source, processes the data so that it is in a form the host application can use, then provides it to the host application.
The image processing pipeline is formed by calling one of the functions in an image processing library, for example, and instantiating the called function to form a first task. The first task becomes an upstream-most section of the pipeline. The upstream-most pipeline section obtains a data element to be processed from the data source. In an image processing system, the data element could be a single scanline of a raster scan of an image. The data source could be a scanner, a facsimile machine, a remote computer, a sensor, or the like, outputting a serial or parallel data signal, or a block of stored data in a memory, such as a ROM, a RAM, or a disk in a disk drive. The data element can also be directly generated by the first pipeline section itself. In this last case, the data element can be obtained from the value of an initialized variable, from the state of the first pipeline section, or the like. Once the first pipeline section is instantiated, a backward or upstream link of the host application is set to the first pipeline section.
A second pipeline section is then generally needed to process the data element obtained by the first pipeline section. Therefore, the host application creates another task by instantiating one of the functions in the library to form a second pipeline section. When this second pipeline section is created, it is automatically linked to the first pipeline section. Additionally, the link of the host application is reset to the second pipeline section. If no other image processing operations are required, the link of the host application remains between the portion of the host application which requires the processed data and the second pipeline section.
Processing tasks in a pipeline processing are usually designed to interface with each other in an efficient manner so that a minimum of external controls are required to process the data. However, conventionally only similar types of processing tasks are integrated together to achieve one processing goal. This restriction is undesirable and thus new technology is required to provide greater flexibility in pipeline data processing.